def read_txt(file):
    L = []
    with open(file, 'r', encoding='utf-8') as f:
        for line in f:
            # 去除 \n
            if line[-1] == '\n':
                line = line[:-1]
            # 去除空行
            if line == '':
                continue
            # 去除注释
            if line[0] == '#':
                continue
            # 分割字符串并添加到列表中
            L.append(line.split("|"))
    return L
